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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.z: H = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.p: A = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.z: H = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.p: A = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

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

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