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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: F = None
        self.txt = txt

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

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

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