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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: C = None
        self.v: H = None
        self.x: E = None
        self.s: B = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.p: D = None
        self.s: D = None
        self.o: H = None
        self.y: H = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: C = None
        self.v: H = None
        self.x: E = None
        self.s: B = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.p: D = None
        self.s: D = None
        self.o: H = None
        self.y: H = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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