class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: E = None
        self.x: D = None
        self.p: C = None
        self.u: F = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.t: B = None
        self.o: B = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.t: B = None
        self.o: B = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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