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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: I = None
        self.z: F = None
        self.x: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: E = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: G = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: I = None
        self.z: F = None
        self.x: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: E = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: G = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

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

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

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