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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: B = None
        self.q: C = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.z: C = None
        self.x: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: B = None
        self.q: C = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.z: C = None
        self.x: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: D = None
        self.txt = txt

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

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