class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: D = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

e.r = c
e.p = i
e.t = f
f.w = j
f.q = j
f.y = j
f.s = e
f.p = n
f.z = d
j.o = f
c.w = i
c.o = j
c.x = j
b.t = d
d.z = f
d.p = i
n.w = j
n.q = j
n.y = j
n.s = e
n.p = f
n.z = d
i.w = c
i.o = j
i.x = j
assert n.y.o.s.r.w.w.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: D = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

e.r = c
e.p = i
e.t = f
f.w = j
f.q = j
f.y = j
f.s = e
f.p = n
f.z = d
j.o = f
c.w = i
c.o = j
c.x = j
b.t = d
d.z = f
d.p = i
n.w = j
n.q = j
n.y = j
n.s = e
n.p = f
n.z = d
i.w = c
i.o = j
i.x = j
assert n.y.o.s.r.w.w.w.o.txt == "j"