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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: B = None
        self.t: H = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: C = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: B = None
        self.t: H = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: C = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

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

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