class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: B = None
        self.y: E = None
        self.s: C = None
        self.r: E = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.x: G = None
        self.p: C = None
        self.s: H = None
        self.y: E = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: F = None
        self.s: B = None
        self.t: H = None
        self.u: A = None
        self.y: C = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: A = None
        self.z: G = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: B = None
        self.y: E = None
        self.s: C = None
        self.r: E = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.x: G = None
        self.p: C = None
        self.s: H = None
        self.y: E = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: F = None
        self.s: B = None
        self.t: H = None
        self.u: A = None
        self.y: C = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: A = None
        self.z: G = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

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