class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.w: E = None
        self.o: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.r: D = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.q: H = None
        self.t: H = None
        self.r: G = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.w: E = None
        self.o: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.r: D = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.q: H = None
        self.t: H = None
        self.r: G = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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