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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.o: A = None
        self.r: E = None
        self.u: H = None
        self.q: F = None
        self.x: E = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.o: A = None
        self.r: E = None
        self.u: H = None
        self.q: F = None
        self.x: E = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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