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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: B = None
        self.r: C = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: I = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: B = None
        self.r: C = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: I = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

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

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

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