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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: D = None
        self.u: F = None
        self.o: I = None
        self.s: F = None
        self.r: A = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.v: B = None
        self.s: E = None
        self.t: B = None
        self.p: F = None
        self.u: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: D = None
        self.u: F = None
        self.o: I = None
        self.s: F = None
        self.r: A = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.v: B = None
        self.s: E = None
        self.t: B = None
        self.p: F = None
        self.u: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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