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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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