class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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