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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.x: F = None
        self.u: D = None
        self.v: G = None
        self.y: C = None
        self.s: H = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.z: G = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.o: G = None
        self.q: H = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: B = None
        self.u: D = None
        self.p: D = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.x: F = None
        self.u: D = None
        self.v: G = None
        self.y: C = None
        self.s: H = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.z: G = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.o: G = None
        self.q: H = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: B = None
        self.u: D = None
        self.p: D = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

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

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

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