class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.q: I = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: G = None
        self.y: F = None
        self.p: G = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.w: C = None
        self.o: B = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.z: E = None
        self.x: H = None
        self.o: F = None
        self.p: B = None
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: G = None
        self.y: F = None
        self.p: G = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.w: C = None
        self.o: B = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.z: E = None
        self.x: H = None
        self.o: F = None
        self.p: B = None
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

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