class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.y: G = None
        self.v: F = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.t: G = None
        self.y: D = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.t: G = None
        self.y: D = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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