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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.t: F = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.t: F = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

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

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