class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.x: C = None
        self.v: D = None
        self.q: D = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: C = None
        self.txt = txt

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

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