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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: H = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: H = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: D = None
        self.txt = txt

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

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

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

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