class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.y: B = None
        self.txt = txt

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

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