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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: J = None
        self.u: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

b = A("b")
f = B("f")
g = C("g")
n = D("n")
j = E("j")
l = F("l")
a = G("a")
e = H("e")
i = I("i")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: J = None
        self.u: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

b = A("b")
f = B("f")
g = C("g")
n = D("n")
j = E("j")
l = F("l")
a = G("a")
e = H("e")
i = I("i")
k = J("k")

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