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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: C = None
        self.v: F = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.s: B = None
        self.y: B = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: C = None
        self.v: F = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.s: B = None
        self.y: B = None
        self.q: F = None
        self.txt = txt

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

h.r = b
h.u = i
h.y = f
e.x = n
e.u = b
e.y = b
e.v = g
b.x = j
b.r = e
b.q = l
b.y = i
b.u = n
l.o = e
l.q = e
l.x = n
f.p = j
g.z = i
g.q = i
g.v = e
g.s = e
g.y = e
d.r = j
d.u = g
d.y = f
i.z = g
i.q = g
i.v = e
i.s = e
i.y = e
n.o = e
n.q = e
n.x = l
j.x = b
j.r = e
j.q = l
j.y = i
j.u = n
assert b.y.q.s.v.v.x.q.v.txt == "g"