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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.o: F = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.v: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.o: F = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.v: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.txt = txt

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

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