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

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

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

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

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

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

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

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

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

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

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

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

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

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

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