class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.v: G = None
        self.y: D = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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