class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: D = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.p: C = None
        self.o: G = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.p: C = None
        self.o: G = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

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