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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.t: G = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: G = None
        self.p: A = None
        self.x: G = None
        self.t: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.t: G = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: G = None
        self.p: A = None
        self.x: G = None
        self.t: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

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

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