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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

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

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

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