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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: B = None
        self.y: F = None
        self.v: G = None
        self.x: G = None
        self.r: I = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.u: H = None
        self.p: G = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.z: B = None
        self.w: F = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.v: A = None
        self.w: G = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.x: A = None
        self.v: G = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: B = None
        self.y: F = None
        self.v: G = None
        self.x: G = None
        self.r: I = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.u: H = None
        self.p: G = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.z: B = None
        self.w: F = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.v: A = None
        self.w: G = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.x: A = None
        self.v: G = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

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

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