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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.v: B = None
        self.q: D = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.v: B = None
        self.q: D = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

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

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