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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: D = None
        self.w: B = None
        self.z: C = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: D = None
        self.w: B = None
        self.z: C = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

g.w = l
g.r = f
g.u = i
d.w = a
d.v = j
d.t = k
l.v = f
l.t = g
l.q = i
l.z = d
l.s = a
a.p = e
a.t = e
a.v = e
a.s = j
a.u = g
a.q = f
k.r = f
k.w = f
k.u = f
k.t = e
k.s = g
j.x = f
j.t = a
j.w = d
j.y = d
j.u = d
j.z = l
i.v = k
i.t = g
i.q = l
i.z = d
i.s = a
e.p = a
e.t = a
e.v = a
e.s = j
e.u = g
e.q = f
f.r = k
f.w = k
f.u = k
f.t = e
f.s = g
assert k.u.t.v.u.r.txt == "f"