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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.v: H = None
        self.x: G = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.p: E = None
        self.u: A = None
        self.y: E = None
        self.r: G = None
        self.t: E = None
        self.txt = txt

a = A("a")
d = B("d")
l = C("l")
b = D("b")
j = E("j")
g = F("g")
i = G("i")
h = H("h")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: H = None
        self.v: H = None
        self.x: G = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.p: E = None
        self.u: A = None
        self.y: E = None
        self.r: G = None
        self.t: E = None
        self.txt = txt

a = A("a")
d = B("d")
l = C("l")
b = D("b")
j = E("j")
g = F("g")
i = G("i")
h = H("h")

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