class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: D = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: E = None
        self.w: A = None
        self.x: F = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: C = None
        self.w: A = None
        self.u: G = None
        self.t: B = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.r: C = None
        self.y: A = None
        self.x: B = None
        self.p: B = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: E = None
        self.w: A = None
        self.x: F = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: C = None
        self.w: A = None
        self.u: G = None
        self.t: B = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.r: C = None
        self.y: A = None
        self.x: B = None
        self.p: B = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

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

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