class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: G = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.w: C = None
        self.x: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.w: C = None
        self.x: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

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