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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.t: B = None
        self.p: E = None
        self.x: H = None
        self.o: G = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: D = None
        self.p: C = None
        self.v: I = None
        self.u: A = None
        self.r: B = None
        self.z: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: G = None
        self.y: D = None
        self.o: E = None
        self.v: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.t: B = None
        self.p: E = None
        self.x: H = None
        self.o: G = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: D = None
        self.p: C = None
        self.v: I = None
        self.u: A = None
        self.r: B = None
        self.z: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: G = None
        self.y: D = None
        self.o: E = None
        self.v: E = None
        self.x: A = None
        self.txt = txt

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

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