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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.v: E = None
        self.x: A = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.v: E = None
        self.x: A = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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