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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.o: A = None
        self.q: A = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: B = None
        self.t: G = None
        self.s: G = None
        self.y: A = None
        self.x: E = None
        self.z: F = None
        self.r: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: B = None
        self.z: G = None
        self.txt = txt

c = A("c")
j = B("j")
f = C("f")
a = D("a")
n = E("n")
e = F("e")
i = G("i")
g = H("g")

c.x = a
j.u = e
j.v = g
j.o = c
j.q = c
j.p = f
f.p = g
f.s = c
f.x = c
a.u = i
a.t = i
a.s = i
a.v = j
a.y = c
a.x = n
a.z = e
a.r = f
n.u = j
e.v = f
i.t = j
i.p = j
i.o = j
i.y = n
i.s = a
i.w = a
i.u = e
i.r = g
g.y = j
g.v = j
g.z = i
assert f.s.x.z.v.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.o: A = None
        self.q: A = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: B = None
        self.t: G = None
        self.s: G = None
        self.y: A = None
        self.x: E = None
        self.z: F = None
        self.r: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: B = None
        self.z: G = None
        self.txt = txt

c = A("c")
j = B("j")
f = C("f")
a = D("a")
n = E("n")
e = F("e")
i = G("i")
g = H("g")

c.x = a
j.u = e
j.v = g
j.o = c
j.q = c
j.p = f
f.p = g
f.s = c
f.x = c
a.u = i
a.t = i
a.s = i
a.v = j
a.y = c
a.x = n
a.z = e
a.r = f
n.u = j
e.v = f
i.t = j
i.p = j
i.o = j
i.y = n
i.s = a
i.w = a
i.u = e
i.r = g
g.y = j
g.v = j
g.z = i
assert f.s.x.z.v.p.y.txt == "j"