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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.t: G = None
        self.p: G = None
        self.q: E = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: H = None
        self.p: B = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.t: G = None
        self.p: G = None
        self.q: E = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: H = None
        self.p: B = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

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

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