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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.t: C = None
        self.x: D = None
        self.o: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

c = A("c")
e = B("e")
h = C("h")
m = D("m")
i = E("i")
f = F("f")
a = E("a")
l = B("l")
g = E("g")
k = C("k")

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.t: C = None
        self.x: D = None
        self.o: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

c = A("c")
e = B("e")
h = C("h")
m = D("m")
i = E("i")
f = F("f")
a = E("a")
l = B("l")
g = E("g")
k = C("k")

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