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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.o: A = None
        self.y: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: G = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.o: A = None
        self.y: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: G = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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

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

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