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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: E = None
        self.u: D = None
        self.p: D = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: I = None
        self.w: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: E = None
        self.u: D = None
        self.p: D = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: I = None
        self.w: E = None
        self.y: G = None
        self.txt = txt

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

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

h.z = g
h.r = j
h.o = j
h.w = e
h.p = e
h.u = c
h.s = k
h.t = l
i.v = j
i.w = g
j.r = i
j.t = i
j.p = c
c.o = j
c.t = j
c.x = f
l.p = f
l.o = e
f.v = k
f.z = l
f.u = c
f.p = c
f.w = e
f.o = i
k.y = j
k.t = j
k.x = g
k.s = e
e.p = f
e.o = g
e.w = l
e.y = k
g.x = c
assert l.o.o.x.t.p.txt == "c"