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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

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

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