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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: C = None
        self.q: G = None
        self.s: D = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

l = A("l")
d = B("d")
f = C("f")
g = D("g")
i = E("i")
c = F("c")
b = G("b")
e = H("e")
n = I("n")

l.q = e
l.v = g
d.y = f
f.t = d
g.t = b
i.p = l
i.r = f
i.q = b
i.s = g
i.t = e
i.y = e
c.x = b
c.u = n
c.o = g
c.t = g
c.q = f
c.r = i
c.p = e
c.w = l
c.v = l
b.s = c
b.p = c
b.z = c
b.x = c
b.v = f
b.r = i
b.o = n
b.w = l
b.t = e
e.x = b
e.w = i
n.o = f
n.q = l
assert i.y.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: C = None
        self.q: G = None
        self.s: D = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

l = A("l")
d = B("d")
f = C("f")
g = D("g")
i = E("i")
c = F("c")
b = G("b")
e = H("e")
n = I("n")

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