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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: B = None
        self.o: G = None
        self.w: B = None
        self.s: F = None
        self.q: B = None
        self.y: H = None
        self.t: H = None
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: B = None
        self.o: G = None
        self.w: B = None
        self.s: F = None
        self.q: B = None
        self.y: H = None
        self.t: H = None
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

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

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

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

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