class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.o: E = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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