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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: B = None
        self.t: B = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.y: A = None
        self.x: E = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: B = None
        self.t: B = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.y: A = None
        self.x: E = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

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

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