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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: A = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.y: E = None
        self.p: C = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: B = None
        self.s: E = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

g = A("g")
m = B("m")
n = C("n")
f = D("f")
b = E("b")
c = F("c")
a = D("a")
e = C("e")
l = E("l")

g.z = c
m.u = n
m.s = g
m.o = g
m.r = a
n.o = a
f.o = c
f.y = a
f.p = e
b.z = l
b.y = l
b.r = c
b.p = e
b.x = e
b.u = g
c.t = n
c.q = n
c.p = m
c.s = l
c.x = l
a.o = c
a.y = f
a.p = e
e.o = a
l.z = b
l.y = b
l.r = c
l.p = e
l.u = g
l.x = n
assert f.p.o.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: A = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.y: E = None
        self.p: C = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: B = None
        self.s: E = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

g = A("g")
m = B("m")
n = C("n")
f = D("f")
b = E("b")
c = F("c")
a = D("a")
e = C("e")
l = E("l")

g.z = c
m.u = n
m.s = g
m.o = g
m.r = a
n.o = a
f.o = c
f.y = a
f.p = e
b.z = l
b.y = l
b.r = c
b.p = e
b.x = e
b.u = g
c.t = n
c.q = n
c.p = m
c.s = l
c.x = l
a.o = c
a.y = f
a.p = e
e.o = a
l.z = b
l.y = b
l.r = c
l.p = e
l.u = g
l.x = n
assert f.p.o.y.y.txt == "a"