class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: I = None
        self.q: C = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.z: E = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.o: F = None
        self.u: C = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: C = None
        self.w: C = None
        self.z: A = None
        self.x: B = None
        self.s: G = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.o: D = None
        self.u: E = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

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

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

f.t = k
f.y = k
f.s = e
f.q = i
a.o = g
a.p = g
a.y = g
a.v = g
a.z = b
a.r = f
a.u = j
a.t = e
i.s = f
i.t = c
i.z = k
i.u = b
g.w = c
g.y = c
g.o = c
g.u = i
g.v = e
m.q = b
m.u = i
m.w = i
m.z = f
m.x = a
m.s = j
m.t = g
c.q = e
j.x = m
j.u = m
j.v = c
j.o = g
j.r = g
j.p = f
b.v = g
b.o = a
b.w = a
b.x = e
b.r = e
b.u = f
e.v = f
k.q = b
k.u = i
k.w = i
k.z = f
k.x = a
k.s = j
k.t = g
assert a.u.o.y.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: I = None
        self.q: C = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.z: E = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.o: F = None
        self.u: C = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: C = None
        self.w: C = None
        self.z: A = None
        self.x: B = None
        self.s: G = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.o: D = None
        self.u: E = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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