class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.t: I = None
        self.p: I = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.t: I = None
        self.y: B = None
        self.s: B = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: A = None
        self.q: D = None
        self.p: A = None
        self.v: B = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.t: I = None
        self.p: I = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.t: I = None
        self.y: B = None
        self.s: B = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: A = None
        self.q: D = None
        self.p: A = None
        self.v: B = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

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

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