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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.txt = txt

j = A("j")
n = B("n")
b = C("b")
e = C("e")
a = C("a")
i = B("i")
h = A("h")
f = A("f")

j.s = b
j.x = e
j.t = h
n.y = i
b.p = n
b.y = h
e.p = i
e.y = f
a.p = i
a.y = f
i.y = n
h.s = e
h.x = b
h.t = f
f.s = a
f.x = e
f.t = j
assert a.y.x.y.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.txt = txt

j = A("j")
n = B("n")
b = C("b")
e = C("e")
a = C("a")
i = B("i")
h = A("h")
f = A("f")

j.s = b
j.x = e
j.t = h
n.y = i
b.p = n
b.y = h
e.p = i
e.y = f
a.p = i
a.y = f
i.y = n
h.s = e
h.x = b
h.t = f
f.s = a
f.x = e
f.t = j
assert a.y.x.y.t.x.txt == "e"