class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.v: F = None
        self.p: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: E = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: E = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

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