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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.w: G = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

e = A("e")
h = B("h")
f = C("f")
j = D("j")
m = E("m")
k = F("k")
i = G("i")
d = E("d")
c = A("c")
l = F("l")

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.w: G = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

e = A("e")
h = B("h")
f = C("f")
j = D("j")
m = E("m")
k = F("k")
i = G("i")
d = E("d")
c = A("c")
l = F("l")

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