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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: H = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.z: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: H = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.z: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

g.v = a
g.r = a
g.o = h
g.w = m
g.u = c
j.s = n
f.q = j
f.x = j
f.v = g
a.o = j
a.w = k
a.u = c
a.q = n
c.w = h
c.z = h
c.s = l
c.v = a
n.o = g
n.u = m
h.o = n
h.w = g
k.w = j
k.s = n
l.w = h
l.z = h
l.s = c
l.v = a
m.o = g
m.u = n
assert g.u.v.q.o.txt == "g"