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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.z: I = None
        self.u: F = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: I = None
        self.v: A = None
        self.u: I = None
        self.x: H = None
        self.z: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: H = None
        self.z: E = None
        self.w: I = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.x: A = None
        self.r: B = None
        self.t: I = None
        self.s: D = None
        self.y: A = None
        self.q: H = None
        self.p: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.z: I = None
        self.u: F = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: I = None
        self.v: A = None
        self.u: I = None
        self.x: H = None
        self.z: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: H = None
        self.z: E = None
        self.w: I = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.x: A = None
        self.r: B = None
        self.t: I = None
        self.s: D = None
        self.y: A = None
        self.q: H = None
        self.p: I = None
        self.txt = txt

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

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

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

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