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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.p: F = None
        self.y: C = None
        self.s: I = None
        self.x: F = None
        self.o: H = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

g = A("g")
l = B("l")
b = C("b")
j = D("j")
c = E("c")
i = F("i")
d = G("d")
n = H("n")
m = I("m")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.p: F = None
        self.y: C = None
        self.s: I = None
        self.x: F = None
        self.o: H = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

g = A("g")
l = B("l")
b = C("b")
j = D("j")
c = E("c")
i = F("i")
d = G("d")
n = H("n")
m = I("m")

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