class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: H = None
        self.o: G = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: H = None
        self.r: C = None
        self.x: F = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: B = None
        self.y: A = None
        self.u: H = None
        self.z: I = None
        self.s: C = None
        self.o: C = None
        self.q: I = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.s: A = None
        self.y: C = None
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.t: D = None
        self.v: C = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: D = None
        self.r: F = None
        self.txt = txt

m = A("m")
c = B("c")
b = C("b")
j = D("j")
i = E("i")
a = F("a")
l = G("l")
e = H("e")
d = I("d")
h = F("h")

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: H = None
        self.r: C = None
        self.x: F = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: B = None
        self.y: A = None
        self.u: H = None
        self.z: I = None
        self.s: C = None
        self.o: C = None
        self.q: I = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.s: A = None
        self.y: C = None
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.t: D = None
        self.v: C = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: D = None
        self.r: F = None
        self.txt = txt

m = A("m")
c = B("c")
b = C("b")
j = D("j")
i = E("i")
a = F("a")
l = G("l")
e = H("e")
d = I("d")
h = F("h")

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