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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: C = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.p: G = None
        self.v: I = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

c = A("c")
m = B("m")
h = C("h")
e = D("e")
d = E("d")
f = F("f")
g = G("g")
n = H("n")
i = I("i")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: C = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.p: G = None
        self.v: I = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

c = A("c")
m = B("m")
h = C("h")
e = D("e")
d = E("d")
f = F("f")
g = G("g")
n = H("n")
i = I("i")
l = G("l")

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