class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: B = None
        self.s: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.v: A = None
        self.z: E = None
        self.x: G = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

g = A("g")
c = B("c")
a = C("a")
b = D("b")
e = E("e")
j = F("j")
n = G("n")
h = D("h")
i = C("i")
k = A("k")

g.q = k
g.x = c
g.s = n
g.o = b
c.s = j
c.y = e
c.t = h
c.q = h
a.y = b
b.r = c
e.p = b
e.o = i
j.u = i
j.s = a
j.v = k
j.w = k
j.z = e
j.t = e
j.x = n
n.s = h
h.r = c
i.y = b
k.q = g
k.x = c
k.s = n
k.o = h
assert i.y.r.t.r.s.u.y.r.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: B = None
        self.s: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.v: A = None
        self.z: E = None
        self.x: G = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

g = A("g")
c = B("c")
a = C("a")
b = D("b")
e = E("e")
j = F("j")
n = G("n")
h = D("h")
i = C("i")
k = A("k")

g.q = k
g.x = c
g.s = n
g.o = b
c.s = j
c.y = e
c.t = h
c.q = h
a.y = b
b.r = c
e.p = b
e.o = i
j.u = i
j.s = a
j.v = k
j.w = k
j.z = e
j.t = e
j.x = n
n.s = h
h.r = c
i.y = b
k.q = g
k.x = c
k.s = n
k.o = h
assert i.y.r.t.r.s.u.y.r.t.r.txt == "c"