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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: G = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: C = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

l = A("l")
e = B("e")
d = C("d")
i = D("i")
n = E("n")
h = F("h")
c = G("c")
m = F("m")
g = D("g")
j = B("j")

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: G = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: C = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

l = A("l")
e = B("e")
d = C("d")
i = D("i")
n = E("n")
h = F("h")
c = G("c")
m = F("m")
g = D("g")
j = B("j")

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