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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: C = None
        self.s: A = None
        self.z: C = None
        self.w: E = None
        self.u: J = None
        self.o: F = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.w: A = None
        self.y: E = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: C = None
        self.s: A = None
        self.z: C = None
        self.w: E = None
        self.u: J = None
        self.o: F = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.w: A = None
        self.y: E = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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