class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.y: B = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.y: B = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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