class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: A = None
        self.w: F = None
        self.v: E = None
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: F = None
        self.p: E = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.o: A = None
        self.r: C = None
        self.z: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: F = None
        self.p: E = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.o: A = None
        self.r: C = None
        self.z: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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