class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.w: G = None
        self.o: C = None
        self.p: B = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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