class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.r: B = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: B = None
        self.o: C = None
        self.r: F = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

k.w = m
k.r = m
k.z = f
k.x = l
k.v = i
m.t = i
m.y = i
m.v = j
b.w = l
b.r = l
b.y = a
b.p = a
i.w = k
i.v = j
i.u = l
i.p = a
a.w = l
a.p = m
a.u = m
a.o = f
a.r = c
a.q = d
j.v = k
c.v = l
d.w = k
d.p = m
d.u = m
d.o = b
d.r = j
d.q = a
l.w = m
l.r = m
l.z = f
l.x = k
l.v = i
f.w = l
f.r = l
f.y = d
f.p = a
assert f.r.v.w.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.r: B = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: B = None
        self.o: C = None
        self.r: F = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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