class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.t: H = None
        self.p: E = None
        self.u: F = None
        self.y: E = None
        self.s: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: F = None
        self.t: H = None
        self.s: E = None
        self.u: E = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: F = None
        self.t: H = None
        self.s: E = None
        self.u: E = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

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

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

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