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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

m = A("m")
h = B("h")
f = C("f")
e = D("e")
a = E("a")
j = F("j")
c = E("c")

m.v = e
h.p = e
f.v = h
f.t = j
f.p = j
f.o = j
f.z = e
e.y = h
a.t = c
a.x = c
a.s = c
a.y = h
a.o = m
a.r = f
j.u = f
j.t = f
j.x = m
c.t = a
c.x = a
c.s = a
c.y = h
c.o = m
c.r = f
assert e.y.p.y.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

m = A("m")
h = B("h")
f = C("f")
e = D("e")
a = E("a")
j = F("j")
c = E("c")

m.v = e
h.p = e
f.v = h
f.t = j
f.p = j
f.o = j
f.z = e
e.y = h
a.t = c
a.x = c
a.s = c
a.y = h
a.o = m
a.r = f
j.u = f
j.t = f
j.x = m
c.t = a
c.x = a
c.s = a
c.y = h
c.o = m
c.r = f
assert e.y.p.y.p.y.txt == "h"