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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.v: E = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

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

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

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

n.w = m
n.s = b
f.t = j
f.o = c
f.r = m
f.w = b
j.w = f
b.o = d
b.s = m
b.v = i
b.z = i
b.r = j
i.s = b
i.v = j
i.u = d
i.o = d
k.z = j
k.p = j
k.u = m
k.v = i
m.w = n
m.s = c
c.o = b
c.s = n
c.v = i
c.z = i
c.r = j
d.o = c
d.s = n
d.v = i
d.z = i
d.r = j
assert j.w.t.w.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.v: E = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

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

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

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

n.w = m
n.s = b
f.t = j
f.o = c
f.r = m
f.w = b
j.w = f
b.o = d
b.s = m
b.v = i
b.z = i
b.r = j
i.s = b
i.v = j
i.u = d
i.o = d
k.z = j
k.p = j
k.u = m
k.v = i
m.w = n
m.s = c
c.o = b
c.s = n
c.v = i
c.z = i
c.r = j
d.o = c
d.s = n
d.v = i
d.z = i
d.r = j
assert j.w.t.w.r.s.txt == "c"