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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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