class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.u: F = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.y: H = None
        self.z: G = None
        self.s: A = None
        self.t: F = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.s: D = None
        self.o: E = None
        self.r: A = None
        self.y: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.u: F = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.y: H = None
        self.z: G = None
        self.s: A = None
        self.t: F = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.s: D = None
        self.o: E = None
        self.r: A = None
        self.y: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

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