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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.q: G = None
        self.w: A = None
        self.y: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.w: D = None
        self.o: A = None
        self.s: A = None
        self.t: A = None
        self.txt = txt

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

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

d = A("d")
h = B("h")
f = C("f")
n = D("n")
g = E("g")
j = F("j")
b = G("b")
k = H("k")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.q: G = None
        self.w: A = None
        self.y: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: C = None
        self.w: D = None
        self.o: A = None
        self.s: A = None
        self.t: A = None
        self.txt = txt

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

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

d = A("d")
h = B("h")
f = C("f")
n = D("n")
g = E("g")
j = F("j")
b = G("b")
k = H("k")
l = G("l")

d.v = f
d.o = j
d.q = k
d.p = l
h.t = j
h.p = g
h.x = d
f.t = g
f.q = g
n.z = k
n.p = d
n.w = f
n.u = f
n.v = h
n.t = l
g.r = j
g.o = k
g.q = l
g.w = d
g.y = h
g.t = h
j.q = g
j.z = f
j.w = n
j.o = d
j.s = d
j.t = d
b.x = g
b.q = h
k.w = h
k.t = d
k.x = g
l.x = g
l.q = h
assert d.v.q.r.o.q.w.x.txt == "d"