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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: G = None
        self.t: D = None
        self.v: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.q: I = None
        self.w: B = None
        self.p: B = None
        self.u: E = None
        self.t: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: I = None
        self.s: G = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.p: A = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: G = None
        self.t: D = None
        self.v: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.q: I = None
        self.w: B = None
        self.p: B = None
        self.u: E = None
        self.t: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: I = None
        self.s: G = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.p: A = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

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

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