class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.w: F = None
        self.y: G = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.z: F = 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.x: H = None
        self.u: C = None
        self.v: G = None
        self.z: H = None
        self.o: E = None
        self.r: E = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: I = None
        self.v: G = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.z: F = 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.x: H = None
        self.u: C = None
        self.v: G = None
        self.z: H = None
        self.o: E = None
        self.r: E = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: I = None
        self.v: G = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

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