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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.t: E = None
        self.s: B = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.t: E = None
        self.s: B = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

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

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

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