class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

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

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