class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.s: C = None
        self.y: A = None
        self.o: C = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.o: E = None
        self.y: G = None
        self.s: E = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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

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

f = A("f")
i = B("i")
k = C("k")
c = D("c")
m = E("m")
l = F("l")
g = G("g")
n = G("n")
d = F("d")
a = D("a")

f.u = i
f.w = c
f.z = m
i.x = g
i.z = g
i.s = k
i.o = k
i.p = k
i.y = f
i.u = c
k.o = c
k.y = c
k.s = n
k.z = i
k.u = i
c.w = f
c.p = a
c.r = a
c.t = a
c.o = m
c.s = m
c.y = g
m.z = g
m.u = f
m.p = f
l.s = f
l.x = f
l.r = d
l.v = d
l.p = d
l.u = a
g.z = k
g.w = k
g.y = f
g.t = f
g.u = m
g.x = n
g.s = d
n.z = k
n.w = k
n.y = f
n.t = f
n.u = m
n.x = g
n.s = l
d.s = f
d.x = f
d.r = l
d.v = l
d.p = l
d.u = c
a.w = f
a.p = c
a.r = c
a.t = c
a.o = m
a.s = m
a.y = n
assert m.u.u.y.w.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.s: C = None
        self.y: A = None
        self.o: C = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.o: E = None
        self.y: G = None
        self.s: E = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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

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

f = A("f")
i = B("i")
k = C("k")
c = D("c")
m = E("m")
l = F("l")
g = G("g")
n = G("n")
d = F("d")
a = D("a")

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