class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: J = None
        self.q: F = None
        self.u: F = None
        self.r: D = None
        self.v: E = None
        self.o: G = None
        self.w: H = None
        self.s: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.u: J = None
        self.t: A = None
        self.o: B = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: J = None
        self.q: F = None
        self.u: F = None
        self.r: D = None
        self.v: E = None
        self.o: G = None
        self.w: H = None
        self.s: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.u: J = None
        self.t: A = None
        self.o: B = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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