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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.o: H = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: B = None
        self.v: G = None
        self.y: G = None
        self.u: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.txt = txt

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

a = A("a")
l = B("l")
c = C("c")
d = D("d")
h = E("h")
b = F("b")
f = G("f")
i = H("i")

a.q = i
a.v = c
l.w = f
l.v = f
l.t = f
l.o = i
l.y = a
c.s = i
c.p = d
d.s = l
d.w = l
d.r = l
d.v = a
d.q = a
d.z = i
d.u = c
d.y = h
h.x = d
b.p = h
b.q = l
b.v = f
b.y = f
b.u = a
b.w = a
f.q = b
f.t = i
i.x = h
i.t = h
i.q = h
i.y = f
i.v = b
i.u = a
i.z = a
i.o = d
assert b.p.x.u.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.o: H = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: B = None
        self.v: G = None
        self.y: G = None
        self.u: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.txt = txt

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

a = A("a")
l = B("l")
c = C("c")
d = D("d")
h = E("h")
b = F("b")
f = G("f")
i = H("i")

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