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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.t: F = None
        self.y: A = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: F = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.w: I = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.q: H = None
        self.o: D = None
        self.w: H = None
        self.z: D = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: I = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.t: F = None
        self.y: A = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: F = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.w: I = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.q: H = None
        self.o: D = None
        self.w: H = None
        self.z: D = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: I = None
        self.u: D = None
        self.txt = txt

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

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

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