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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.z: C = None
        self.q: E = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.z: C = None
        self.q: E = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.txt = txt

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

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