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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.o: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.s: B = None
        self.u: B = None
        self.z: G = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.o: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.s: B = None
        self.u: B = None
        self.z: G = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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