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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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