class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.x: A = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.o: F = None
        self.s: B = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.x: A = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.o: F = None
        self.s: B = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

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

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