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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: F = None
        self.v: A = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: F = None
        self.v: A = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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

j.t = a
j.x = b
d.p = n
d.o = b
d.v = j
d.r = j
d.s = j
a.z = b
a.u = j
a.r = h
n.r = j
k.r = l
k.o = e
k.p = i
l.v = b
l.t = d
l.w = e
i.v = b
i.p = j
e.w = k
e.v = j
h.r = j
b.v = l
b.t = d
b.w = e
assert k.p.v.v.t.v.x.t.s.t.u.txt == "j"