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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

j = A("j")
i = B("i")
l = C("l")
f = D("f")
k = E("k")
d = F("d")
h = B("h")
g = D("g")
a = B("a")
c = A("c")

j.w = k
i.w = h
i.o = l
i.u = l
i.p = g
l.u = g
f.o = g
f.z = g
f.w = c
f.v = h
f.y = d
k.p = f
k.u = d
k.z = d
k.t = j
k.q = c
k.v = c
d.r = i
d.p = l
d.v = l
h.w = i
h.o = l
h.u = l
h.p = g
g.o = f
g.z = f
g.w = c
g.v = h
g.y = d
a.w = h
a.o = l
a.u = l
a.p = f
c.w = k
assert k.v.w.v.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

j = A("j")
i = B("i")
l = C("l")
f = D("f")
k = E("k")
d = F("d")
h = B("h")
g = D("g")
a = B("a")
c = A("c")

j.w = k
i.w = h
i.o = l
i.u = l
i.p = g
l.u = g
f.o = g
f.z = g
f.w = c
f.v = h
f.y = d
k.p = f
k.u = d
k.z = d
k.t = j
k.q = c
k.v = c
d.r = i
d.p = l
d.v = l
h.w = i
h.o = l
h.u = l
h.p = g
g.o = f
g.z = f
g.w = c
g.v = h
g.y = d
a.w = h
a.o = l
a.u = l
a.p = f
c.w = k
assert k.v.w.v.w.p.txt == "f"