class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: I = None
        self.q: E = None
        self.y: H = None
        self.w: A = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.z: H = None
        self.q: H = None
        self.y: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.w: B = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: I = None
        self.r: C = None
        self.s: H = None
        self.w: B = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.r: D = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: I = None
        self.q: E = None
        self.y: H = None
        self.w: A = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.z: H = None
        self.q: H = None
        self.y: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.w: B = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: I = None
        self.r: C = None
        self.s: H = None
        self.w: B = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.r: D = None
        self.w: F = None
        self.txt = txt

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

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