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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.s: G = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.s: G = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

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

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