class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: I = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.p: A = None
        self.o: F = None
        self.y: H = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.y: D = None
        self.o: C = None
        self.v: E = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.p: A = None
        self.o: F = None
        self.y: H = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.y: D = None
        self.o: C = None
        self.v: E = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

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

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