class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: D = None
        self.q: I = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.x: F = None
        self.txt = txt

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

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

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

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