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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

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