class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: H = None
        self.w: H = None
        self.v: F = None
        self.o: D = None
        self.s: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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