class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: F = None
        self.o: C = None
        self.q: B = None
        self.y: A = None
        self.r: B = None
        self.txt = txt

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

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

n = A("n")
g = B("g")
m = C("m")
j = D("j")
b = E("b")
k = F("k")
d = G("d")
e = E("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: F = None
        self.o: C = None
        self.q: B = None
        self.y: A = None
        self.r: B = None
        self.txt = txt

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

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

n = A("n")
g = B("g")
m = C("m")
j = D("j")
b = E("b")
k = F("k")
d = G("d")
e = E("e")

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