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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.u: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.u: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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