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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.p: F = None
        self.u: C = None
        self.y: F = None
        self.v: C = None
        self.o: E = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.s: E = None
        self.t: E = None
        self.v: F = None
        self.o: A = None
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

i = A("i")
c = B("c")
d = C("d")
e = D("e")
k = E("k")
f = F("f")
j = G("j")
b = H("b")
h = E("h")

i.w = d
i.q = d
i.s = c
i.t = f
i.x = h
c.t = d
c.q = d
c.u = d
c.v = d
c.p = f
c.y = f
c.o = h
c.z = b
d.w = i
d.q = i
d.t = k
d.s = k
d.u = e
d.v = f
d.x = c
e.s = i
e.v = d
e.w = j
k.x = b
k.p = i
k.o = i
k.s = h
k.t = h
k.v = f
k.w = c
k.u = d
f.x = i
f.p = i
f.u = i
f.v = j
f.o = j
f.y = e
j.x = c
j.o = i
j.t = i
b.v = j
b.p = i
h.x = b
h.p = i
h.o = i
h.s = k
h.t = k
h.v = f
h.w = c
h.u = d
assert d.x.z.v.x.y.y.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.t: F = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.p: F = None
        self.u: C = None
        self.y: F = None
        self.v: C = None
        self.o: E = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.s: E = None
        self.t: E = None
        self.v: F = None
        self.o: A = None
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

i = A("i")
c = B("c")
d = C("d")
e = D("e")
k = E("k")
f = F("f")
j = G("j")
b = H("b")
h = E("h")

i.w = d
i.q = d
i.s = c
i.t = f
i.x = h
c.t = d
c.q = d
c.u = d
c.v = d
c.p = f
c.y = f
c.o = h
c.z = b
d.w = i
d.q = i
d.t = k
d.s = k
d.u = e
d.v = f
d.x = c
e.s = i
e.v = d
e.w = j
k.x = b
k.p = i
k.o = i
k.s = h
k.t = h
k.v = f
k.w = c
k.u = d
f.x = i
f.p = i
f.u = i
f.v = j
f.o = j
f.y = e
j.x = c
j.o = i
j.t = i
b.v = j
b.p = i
h.x = b
h.p = i
h.o = i
h.s = k
h.t = k
h.v = f
h.w = c
h.u = d
assert d.x.z.v.x.y.y.v.txt == "d"