class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.p: I = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.r: F = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.u: D = None
        self.r: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: G = None
        self.t: C = None
        self.u: E = None
        self.x: C = None
        self.z: A = None
        self.w: F = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: I = None
        self.x: B = None
        self.p: G = None
        self.z: A = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.r: F = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.u: D = None
        self.r: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: G = None
        self.t: C = None
        self.u: E = None
        self.x: C = None
        self.z: A = None
        self.w: F = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: I = None
        self.x: B = None
        self.p: G = None
        self.z: A = None
        self.s: H = None
        self.txt = txt

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

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