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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.u: D = None
        self.s: B = None
        self.y: G = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.p: D = None
        self.o: D = None
        self.u: H = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.u: D = None
        self.s: B = None
        self.y: G = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.p: D = None
        self.o: D = None
        self.u: H = None
        self.x: E = None
        self.txt = txt

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

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

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