class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: E = None
        self.o: G = None
        self.t: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

i = A("i")
a = B("a")
g = C("g")
b = D("b")
h = E("h")
k = F("k")
l = G("l")
n = C("n")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

i = A("i")
a = B("a")
g = C("g")
b = D("b")
h = E("h")
k = F("k")
l = G("l")
n = C("n")

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