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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.w: I = None
        self.q: I = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: I = None
        self.o: H = None
        self.y: B = None
        self.w: I = None
        self.t: J = None
        self.u: A = None
        self.p: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: G = None
        self.o: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.w: I = None
        self.q: I = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: I = None
        self.o: H = None
        self.y: B = None
        self.w: I = None
        self.t: J = None
        self.u: A = None
        self.p: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: G = None
        self.o: J = None
        self.txt = txt

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

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

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