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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.y: F = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: D = None
        self.y: G = None
        self.z: D = None
        self.o: G = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.p: A = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.y: G = None
        self.x: D = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.s: D = None
        self.p: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.y: F = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: D = None
        self.y: G = None
        self.z: D = None
        self.o: G = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.p: A = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.y: G = None
        self.x: D = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.s: D = None
        self.p: B = None
        self.o: H = None
        self.txt = txt

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

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

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