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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

i = A("i")
j = B("j")
g = C("g")
n = D("n")
a = E("a")
l = F("l")
e = G("e")
f = H("f")
m = B("m")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

i = A("i")
j = B("j")
g = C("g")
n = D("n")
a = E("a")
l = F("l")
e = G("e")
f = H("f")
m = B("m")

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