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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: J = None
        self.v: E = None
        self.u: E = None
        self.q: I = None
        self.t: F = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.u: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: A = None
        self.t: A = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: J = None
        self.v: E = None
        self.u: E = None
        self.q: I = None
        self.t: F = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.u: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: A = None
        self.t: A = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

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

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