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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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