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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: I = None
        self.r: G = None
        self.p: E = None
        self.s: F = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: G = None
        self.y: J = None
        self.r: J = None
        self.p: B = None
        self.t: J = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: J = None
        self.t: H = None
        self.y: E = None
        self.z: C = None
        self.p: F = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.txt = txt

c = A("c")
n = B("n")
g = C("g")
b = D("b")
h = E("h")
a = F("a")
e = G("e")
d = H("d")
f = I("f")
l = J("l")

c.r = a
n.w = b
n.x = f
n.r = e
n.p = h
n.u = h
n.z = h
n.s = a
g.z = a
g.u = h
g.r = c
g.v = d
b.t = c
b.u = h
b.s = g
h.z = d
h.q = l
h.u = a
h.x = g
a.v = l
a.y = l
a.r = l
a.t = l
a.u = e
a.p = n
a.z = g
e.t = c
e.y = g
e.s = h
d.q = n
f.v = n
f.q = n
f.x = l
f.t = d
f.y = h
f.z = g
f.p = a
l.t = e
l.u = c
assert g.v.q.w.t.r.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: I = None
        self.r: G = None
        self.p: E = None
        self.s: F = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: G = None
        self.y: J = None
        self.r: J = None
        self.p: B = None
        self.t: J = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: J = None
        self.t: H = None
        self.y: E = None
        self.z: C = None
        self.p: F = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.txt = txt

c = A("c")
n = B("n")
g = C("g")
b = D("b")
h = E("h")
a = F("a")
e = G("e")
d = H("d")
f = I("f")
l = J("l")

c.r = a
n.w = b
n.x = f
n.r = e
n.p = h
n.u = h
n.z = h
n.s = a
g.z = a
g.u = h
g.r = c
g.v = d
b.t = c
b.u = h
b.s = g
h.z = d
h.q = l
h.u = a
h.x = g
a.v = l
a.y = l
a.r = l
a.t = l
a.u = e
a.p = n
a.z = g
e.t = c
e.y = g
e.s = h
d.q = n
f.v = n
f.q = n
f.x = l
f.t = d
f.y = h
f.z = g
f.p = a
l.t = e
l.u = c
assert g.v.q.w.t.r.t.t.txt == "e"