class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: E = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

l = A("l")
h = B("h")
n = C("n")
b = D("b")
e = E("e")
k = F("k")
d = G("d")
f = H("f")

l.s = k
l.u = d
l.p = b
h.t = f
h.v = e
h.r = n
n.s = f
n.y = d
b.t = d
b.x = d
b.v = h
e.v = b
k.q = h
k.o = h
k.v = f
k.w = l
k.r = b
k.t = b
k.x = d
k.u = n
d.s = l
d.r = e
d.w = e
d.z = h
d.v = b
d.t = n
d.x = n
f.q = h
f.v = h
f.o = e
f.t = e
f.w = d
f.s = n
f.z = b
f.x = l
assert f.q.r.y.x.y.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: E = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

l = A("l")
h = B("h")
n = C("n")
b = D("b")
e = E("e")
k = F("k")
d = G("d")
f = H("f")

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