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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: G = None
        self.v: A = None
        self.u: D = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: B = None
        self.x: B = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.o: D = None
        self.u: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.u: A = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: G = None
        self.v: A = None
        self.u: D = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: B = None
        self.x: B = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.o: D = None
        self.u: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.u: A = None
        self.v: B = None
        self.txt = txt

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

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