class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: G = None
        self.v: E = None
        self.x: G = None
        self.q: A = None
        self.t: E = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: F = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.z: B = None
        self.o: F = None
        self.y: E = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

m = A("m")
l = B("l")
k = C("k")
d = D("d")
j = E("j")
g = F("g")
b = G("b")
h = F("h")
n = C("n")
a = E("a")

m.q = b
l.u = j
l.v = j
l.s = b
l.x = b
l.q = m
l.o = m
l.t = a
k.z = j
k.t = a
k.o = n
k.v = d
k.p = l
k.s = l
k.q = m
d.x = b
d.y = h
d.s = h
j.z = h
j.s = h
j.t = n
g.p = h
g.t = d
b.v = l
b.z = l
b.w = l
b.r = l
b.t = m
b.o = h
b.y = j
h.p = g
h.t = d
n.z = j
n.t = a
n.o = k
n.v = d
n.p = l
n.s = l
n.q = m
a.z = g
a.s = h
a.t = k
assert j.t.p.t.s.t.x.y.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: G = None
        self.v: E = None
        self.x: G = None
        self.q: A = None
        self.t: E = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: F = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.z: B = None
        self.o: F = None
        self.y: E = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

m = A("m")
l = B("l")
k = C("k")
d = D("d")
j = E("j")
g = F("g")
b = G("b")
h = F("h")
n = C("n")
a = E("a")

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